package leetcode_601_700;

import java.util.Arrays;

public class LeeCode_628 {
    public static void main(String[] args) {

    }

    private static int maximumProduct(int[] nums) {
        Arrays.sort(nums);
        int n = nums.length;
        int m1 = nums[0] * nums[1];
        int m2 = nums[n - 1] * nums[n - 2];
        return Math.max(m1 * nums[n - 1], m2 * nums[n - 3]);
    }
}
